﻿namespace ChessToys
{
    using System;

    /// <summary>
    /// A turn represents a pair of moves. First moves white than moves black.
    /// </summary>
    public class Turn : AbstractPair<Move, Move>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Turn"/>.
        /// </summary>
        /// <param name="whiteMove">The white move.</param>
        /// <param name="blackMove">The black move.</param>
        public Turn(Move whiteMove, Move blackMove)
            :base(whiteMove, blackMove)
        {
        }

        /// <summary>
        /// Gets the white move.
        /// </summary>
        /// <value>The white move.</value>
        public Move WhiteMove
        {
            get { return First; }
        }

        /// <summary>
        /// Gets the black move.
        /// </summary>
        /// <value>The black move.</value>
        public Move BlackMove
        {
            get { return Second; }
        }

        /// <inheritdoc />
        public override string ToString()
        {
            return String.Format("white: {0}, black: {1}", WhiteMove, BlackMove);
        }
    }
}
